package com.cf.controller;

import com.cf.service.RedisService;
import com.cf.service.ThirdPartException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;

@RestController
public class IndexController {

    @Autowired
    private RedisService redisService;


    @RequestMapping("/set")
    public void set(String key, String data) {
        redisService.set(key, data);
    }

    @RequestMapping("/get")
    public String set(String key) {
        return redisService.get(key);
    }

}
